Dynamic and adaptive quota shares

ABSTRACT

Embodiments relate to dynamically allocating access to a shared resource based on quota shares. An aspect includes computing, by a client node, an expected size of quota shares needed by the client node based on a historical rate of resource consumption by the client node. The client node transmits a request for a count of quota shares based on the expected size. The client node receives an indication that the request for the count of quota shares is one of: granted, denied, and granted-in-part. The client node self-rules the shared resource based on the indication.

BACKGROUND

The present invention relates generally to computing technology, andmore specifically, to dynamic and adaptive quota shares in a distributedfile system.

Quota functions associated with file systems are used to count andrestrict resource usage. Accounting information is provided regardingusage and limits are set by an administrator. Based upon suchinformation, a file system decides whether a resource is allocated to anentity.

Quota functionality is distributed to one or more nodes. Generally thereare two types or kinds of roles for these nodes. A first role is a quotamanager or manager node that maintains global quota information. Asecond role is a quota client or client node that consumes resourcesassociated with the quota and only manages a localized quota within thenode.

Each client node may be allocated an allowance or share of the overallquota. Conventionally quota shares are implemented as fixed sizes forsimplicity. However, such an approach is inefficient in terms ofthroughput or performance given dynamic conditions that may be present.For example, use of fixed-size quota shares may introduce bottlenecksinto a file system.

SUMMARY

Embodiments include a method, system, and computer program product fordynamically allocating access to a shared resource based on quotashares. An aspect includes computing, by a client node, an expected sizeof quota shares needed by the client node based on a historical rate ofresource consumption by the client node. An aspect includestransmitting, by the client node, a request for a count of quota sharesbased on the expected size. An aspect includes receiving, by the clientnode, an indication that the request for the count of quota shares isone of: granted, denied, and granted-in-part. An aspect includesself-ruling, by the client node, the shared resource based on theindication.

In some embodiments, a computer program product is provided fordynamically allocating access to a shared resource based on quotashares. The computer program product comprises a computer readablestorage medium having program instructions embodied therewith, theprogram instructions readable by a client node to cause the client nodeto perform a method. The method comprises computing an expected size ofquota shares needed by the client node based on a historical rate ofresource consumption by the client node. The method comprisestransmitting a request for a count of quota shares based on the expectedsize. The method comprises receiving an indication that the request forthe count of quota shares is one of: granted, denied, andgranted-in-part. The method comprises self-ruling the shared resourcebased on the indication.

In some embodiments, a computer system is provided for dynamicallyallocating access to a shared resource based on quota shares. The systemcomprises a manager node and a plurality of client nodes. The system isconfigured to perform a method. The method comprises computing, by eachof the client nodes, an expected size of quota shares needed by theclient node based on a historical rate of resource consumption by theclient node. The method comprises transmitting, by each of the clientnodes, a request for a count of quota shares to the manager node basedon the expected size for the client node. The method comprisesreceiving, by each of the client nodes, an indication from the managernode that the request for the count of quota shares is one of: granted,denied, and granted-in-part. The method comprises self-ruling, by eachof the client nodes, the shared resource based on the indication.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

The subject matter which is regarded as embodiments is particularlypointed out and distinctly claimed in the claims at the conclusion ofthe specification. The forgoing and other features, and advantages ofthe embodiments are apparent from the following detailed descriptiontaken in conjunction with the accompanying drawings in which:

FIG. 1 depicts a computing system environment in accordance with anembodiment;

FIG. 2 depicts a process flow based on a consumption of a resource inaccordance with an embodiment; and

FIG. 3 depicts a process flow based on a recycling of a resource inaccordance with an embodiment.

DETAILED DESCRIPTION

In accordance with one or more embodiments, systems, apparatuses, andmethods are described that provide for a distribution of quota sharemanagement. The distribution is used to realize a low cost communicationapproach (e.g., minimal communication between a manager and clients)while maintaining accurate quote accounting in a distributed file systemenvironment.

In some embodiments, a client transmits a dynamic, optimized size ofquota shares to a manager based upon the client's historical rate ofresource consumption. In some embodiments, a manager may distributequota shares fairly or equitably. An equitable distribution may entailproviding a larger share of the overall quota to busy clients, e.g.,those clients that handle more operations relative to other clients. Theoperations may include input/output (I/O) handling. Similarly, a lessershare of the overall quota may be provided to idle clients in case themajority of the assigned shares are not used. In this manner, atriggering by the manager to the clients to reclaim any unused quota maybe minimized.

In some embodiments, clients record historical usage information (e.g.,disk blocks/files) for every entity (e.g., users, groups, etc.). Aclient transmits a quota request to a manager based on the recordedhistorical usage information stored at the client. The manager provides,and the client receives, an indication that grants, denies, orgrants-in-part (e.g., reduces) the requested quota based upon globalquota information. The global quota information may include anidentification or specification of remaining quota and how many activequota clients exist. Clients may voluntarily release or return unusedquota shares based upon the historical usage information.

Turning now to FIG. 1, a computing system 100 is generally shown. Thesystem 100 may be associated with a file system, such as a distributedfile system. The system 100 may be associated with one or more networks,such as one or more computer, cable, cellular, or telephone networks.

The system 100 may include a number of devices or nodes. For example, asshown in FIG. 1, the system 100 may include a manager 106 and one ormore clients, such as clients 112-a through 112-e (any one, orcombination, of which is referred to herein as a client 112). Themanager 106 may be coupled to a client 112 over one or morecommunication mediums.

The manager 106 and the clients 112 may include one or more componentsor devices as would be known to one of skill in the art. For example, inan embodiment the manager 106 and the clients 112 each include: (1) atleast one processor, and (2) memory having instructions stored thereonthat, when executed by the at least one processor, cause the manager106/client 112 to perform one or more methodological acts. Othercomponents/devices may be included, such as storage for data.

The manager 106 may be responsible for allocating and (re)distributingquota shares amongst the clients 112. The clients 112 may consumeresources based on the allocated quota shares. In some embodiments, aresource may be consumed or used by one or more clients 112. In someembodiments, a resource may be consumed or used by a first client 112(e.g., client 112-a) at a first instance in time and the resource may beconsumed or used by a second client 112 (e.g., client 112-b) at a secondinstance in time.

In FIG. 1, a dedicated manager 106 is shown. In some embodiments, therole of manager itself may be distributed or shared amongst the nodes,potentially over time. Thus, a given node may serve as a manager at afirst instance in time and may serve as a client at a second instance intime.

In the embodiment of FIG. 1, clients 112-a and 112-b may serve asclients with respect to manager 106. Client 112-a may serve as a managerwith respect to clients 112-c and 112-d. Client 112-b may serve as amanager with respect to client 112-e.

The system 100 is illustrative. A skilled artisan would appreciate thatany number of managers 106 and clients 112 may be included in a givenembodiment. Moreover, the managers 106 and clients 112 may be arrangedwith respect to one another in any manner or at any level ofabstraction.

In accordance with one or more aspects of this disclosure, three timeperiods are defined. A first such time period is referred to as ashort-term period (STP). At the end of every STP, usage isupdated/changed and recorded for every entity or node. A second suchtime period is referred to as a medium-term period (MTP). At the end ofevery MTP, usage is updated/changed and recorded for every entity ornode. A third such time period is referred to as a long-term period(LTP). At the end of every LTP, usage is updated/changed and recordedfor every entity or node. The three time periods (STP, MTP, and LTP) maybe relative to one another, such that the STP may be shorter than theMTP, and the MTP may be shorter than the LTP. The amount of timeassociated with STP, MTP, and LTP may be established based on any systemrequirements or parameters or based on an associated application.

In accordance with one or more aspects of this disclosure, a minimalquota share (MQS) may be defined as the smallest quota transfer that canbe transferred. Such transfer may occur from a client (e.g., client 112)to a manager (e.g., manager 106), or vice versa.

In accordance with one or more aspects of this disclosure, an expectedself-rule time (ESRT) may be defined in the context of quota shares. Aclient may hope to obtain a quota share from a manager, potentiallybased on historical usage information. The client may self-rule quotaallocation on its own node for this time.

As described above, historical usage information associated with clientsmay be recorded. For every client or node, a vector may be defined thatcontains LTP/STP slots. Each slot stores the index-node or inode (file)usage, the block usage, and the time point when this information isrecorded. Based on this vector, a consumption rate may be known betweenany two slots.

There are at least two techniques that may be used to update a vector. Afirst technique is to update the vector whenever usage is changed. Asecond technique is to utilize a background thread that updates thevector every STP. A general parallel file system (GPFS) may update thevector using the first technique.

Turning to FIG. 2, a flow chart of a method 200 is shown. The method 200may be executed by one or more systems, devices, or components, such asthose described herein. The method 200 may execute based on, or inresponse to, a consumption of a resource.

In block 202, a client may update historical usage information.

In block 204, the client may compute a short-term resource-consumingrate (SRR), a medium-term resource-consuming rate (MRR), and a long-termresource-consuming rate (LRR). The computation may be based on thevector described above.

In block 206, the client may compute an expected quota (ExpQuota). Forexample, the computation of block 206 may take the form:ExpQuota=MAX(MAX(SRR, MRR, LRR)*ESRT, MQS), where the MAX functionserves to select the maximum value from the input parameters orarguments to the function.

In block 208, the client may compare any remaining quota(remained_quota) currently available to the client to the expected quota(ExpQuota). If the remained_quota is less than or equal to the ExpQuota:(1) the client may transmit a quota request to the manager so that theclient has at least, e.g., two times ExpQuota (2*ExpQuota) after therequest is fulfilled, and (2) flow may proceed to from block 208 toblock 210. Otherwise, if the remained_quota is greater than ExpQuota,flow may proceed from block 208 to block 214.

In block 210, the manager may determine a quota share to transfer to theclient based on the request of block 208. For example, the manager maygrant and transfer a quota share to the client that is equal to thequota requested by the client if the quota requested by the client isless than or equal to the total remaining quota (total_remaining_quota)divided by the number of clients (#_of_clients). Otherwise, if the quotarequested by the client is greater than(total_remaining_quota/#_of_clients) the manager may grant and transfera quota share that is equal to: MAX(total_remaining_quota/#_of_clients,MQS).

In block 212, the client may obtain the granted/transferred quota shareassociated with block 210. As part of block 212, the client may begin toself-rule at least until its local quota cache drops below a threshold.

In block 214, the client may self-rule by assigning one or moreresources to a specific operation (e.g., I/O handling).

Turning to FIG. 3, a flow chart of a method 300 is shown. The method 300may be executed by one or more systems, devices, or components, such asthose described herein. The method 300 may execute based on, or inresponse to, a recycling of a resource.

In block 302, a client may update historical usage information.

In block 304, the client may compute a SRR, a MRR, and a LRR. Thecomputation may be based on the vector described above.

In block 306, the client may compute an ExpQuota. For example, thecomputation of block 306 may take the form: ExpQuota=MAX(MAX(SRR, MRR,LRR)*ESRT, MQS).

In block 308, the client may compare any remaining quota(remained_quota) currently available to the client to the expected quota(ExpQuota). If the remained_quota is greater than or equal to, e.g.,four times the ExpQuota (4*ExpQuota), the client may transmit a quotarequest to the manager so that the client only keeps, e.g., two timesthe ExpQuota (2*ExpQuota) and releases any excess above 2*ExpQuota tothe manager for possible re-allocation, as indicated in block 310.Otherwise, if the remained_quota is less than 4*ExpQuota, the client maysimply engage in its own bookkeeping regarding its quota and self-rule,as indicated in block 312. The client may provide an indication of arelease to, e.g., the manager as part of the request.

The methods 200 and 300 are illustrative. In some embodiments, one ormore of the blocks, or a portion thereof, may be optional. In someembodiments, additional blocks or operations not shown may be included.In some embodiments, the blocks may execute in an order or sequence thatis different from what is shown in FIG. 2 and/or FIG. 3.

Technical effects and benefits include an ability to maximizeperformance and reliability by obtaining an optimal allocation of quotashares. Client requests for quota shares may be tailored to the specificneeds of the client, thereby expanding the pool of quota available toother clients. In this manner, client requests for quota are more likelyto be satisfied relative to conventional techniques. Furthermore,aspects of the disclosure may be used to reduce signaling betweenclients and one or more managers, thereby preserving communicationbandwidth.

The present invention may be a system, a method, and/or a computerprogram product. The computer program product may include a computerreadable storage medium (or media) having computer readable programinstructions thereon for causing a processor to carry out aspects of thepresent invention.

The computer readable storage medium can be a tangible device that canretain and store instructions for use by an instruction executiondevice. The computer readable storage medium may be, for example, but isnot limited to, an electronic storage device, a magnetic storage device,an optical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination of theforegoing. A non-exhaustive list of more specific examples of thecomputer readable storage medium includes the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a static random access memory (SRAM), a portablecompact disc read-only memory (CD-ROM), a digital versatile disk (DVD),a memory stick, a floppy disk, a mechanically encoded device such aspunch-cards or raised structures in a groove having instructionsrecorded thereon, and any suitable combination of the foregoing. Acomputer readable storage medium, as used herein, is not to be construedas being transitory signals per se, such as radio waves or other freelypropagating electromagnetic waves, electromagnetic waves propagatingthrough a waveguide or other transmission media (e.g., light pulsespassing through a fiber-optic cable), or electrical signals transmittedthrough a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the Internet, a local area network, awide area network and/or a wireless network. The network may comprisecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, or either source code or object code written in anycombination of one or more programming languages, including an objectoriented programming language such as Smalltalk, C++ or the like, andconventional procedural programming languages, such as the “C”programming language or similar programming languages. The computerreadable program instructions may execute entirely on the user'scomputer, partly on the user's computer, as a stand-alone softwarepackage, partly on the user's computer and partly on a remote computeror entirely on the remote computer or server. In the latter scenario,the remote computer may be connected to the user's computer through anytype of network, including a local area network (LAN) or a wide areanetwork (WAN), or the connection may be made to an external computer(for example, through the Internet using an Internet Service Provider).In some embodiments, electronic circuitry including, for example,programmable logic circuitry, field-programmable gate arrays (FPGA), orprogrammable logic arrays (PLA) may execute the computer readableprogram instructions by utilizing state information of the computerreadable program instructions to personalize the electronic circuitry,in order to perform aspects of the present invention

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessor of a general purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks. These computer readable program instructionsmay also be stored in a computer readable storage medium that can directa computer, a programmable data processing apparatus, and/or otherdevices to function in a particular manner, such that the computerreadable storage medium having instructions stored therein comprises anarticle of manufacture including instructions which implement aspects ofthe function/act specified in the flowchart and/or block diagram blockor blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the block may occur out of theorder noted in the figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts or carry out combinations of special purpose hardwareand computer instructions.

The descriptions of the various embodiments of the present inventionhave been presented for purposes of illustration, but are not intendedto be exhaustive or limited to the embodiments disclosed. Manymodifications and variations will be apparent to those of ordinary skillin the art without departing from the scope and spirit of the describedembodiments. The terminology used herein was chosen to best explain theprinciples of the embodiments, the practical application or technicalimprovement over technologies found in the marketplace, or to enableothers of ordinary skill in the art to understand the embodimentsdisclosed herein.

What is claimed is:
 1. A computer program product for dynamicallyallocating access to a shared resource based on quota shares, thecomputer program product comprising: a computer readable storage mediumhaving program instructions embodied therewith, the program instructionsreadable by a client node in a system that includes a plurality ofclient nodes to cause the client node to perform a method comprising:computing, by the client node, an expected size of quota shares neededby the client node based on a historical rate of resource consumption bythe client node, the historical rate of consumption for the client nodebased on information recorded in a vector, the vector including slotscorresponding to time periods, each slot storing index or file usage ofthe client node during a time period, block usage of the client nodeduring the time period, and a time stamp of the time period;transmitting, by the client node, a request to a manager node for anumber of quota shares based on the expected size, wherein the managernode is configured to allocate quota shares across the plurality ofclient nodes; receiving, from the manager node, an indication that therequest for the number of quota shares is one of: granted, denied, andgranted-in-part, the indication including a number of quota sharesgranted to the client node by the manager node; and self-ruling, by theclient node, the shared resource based on the indication, theself-ruling performed for an expected self-rule time that is based onthe number of quota shares granted to the client node, the self-rulinginclude assigning the shared resource to a specific operation.
 2. Thecomputer program product of claim 1, wherein the transmitted request forthe number of quota shares is based on a remaining count of quota ofshares available to the client node prior to the transmission of therequest.
 3. The computer program product of claim 1, wherein theexpected size of quota shares is based on resource usage over ashort-term period, a medium-term period, and a long-term period.
 4. Thecomputer program product of claim 1, wherein the expected size of quotashares is based on an established minimal quota share.
 5. The computerprogram product of claim 1, wherein the shared resource comprises atleast one file, and wherein the specific operation comprisesinput/output handling associated with the at least one file.
 6. Thecomputer program product of claim 1, wherein the transmitted requestcomprises an indication that the client node is releasing the count ofquota shares.
 7. The computer program product of claim 1, wherein thehistorical rate of resource consumption by the client node is based on ahistorical usage of disk files for a plurality of users.
 8. The computerprogram product of claim 1, wherein the vector is updated based on achange in resource usage.
 9. The computer program product of claim 1,wherein the vector is updated by a background thread on a periodicbasis.
 10. A computer system for dynamically allocating access to ashared resource based on quota shares, the system comprising: a managernode; and a plurality of client nodes, the system configured to performa method comprising: computing, by each of the client nodes, an expectedsize of quota shares needed by the client node based on a historicalrate of resource consumption by the client node, the historical rate ofconsumption for the client node based on information recorded in avector, the vector including slots corresponding to time periods, eachslot storing index or file usage of the client node during a timeperiod, block usage of the client node during the time period, and atime stamp of the time period; transmitting, by each of the clientnodes, a request for a number of quota shares to the manager node basedon the expected size for the client node, wherein the manager node isconfigured to allocate quota shares across the plurality of clientnodes; receiving, by each of the client nodes, an indication from themanager node that the request for the number of quota shares is one of:granted, denied, and granted-in-part, the indication including a numberof quota shares granted to the client node by the manager node; andself-ruling, by each of the client nodes, the shared resource based onthe indication, the self-ruling performed for an expected self-rule timethat is based on the number of quota shares granted to the client node,the self-ruling include assigning the shared resource to a specificoperation.
 11. The computer system of claim 10, wherein the methodcomprises: determining, by the manager node, a number of quota shares toallocate to each of the client nodes based on a remaining count ofglobal quota shares available and a count of the number of client nodes,wherein the indication received by each of the client nodes is based onthe determination by the manager node.
 12. The computer system of claim11, wherein the number of quota shares to allocate to each of the clientnodes is based on an established minimal quota share.
 13. The computersystem of claim 10, wherein the transmitted request by each of theclient nodes for the count of quota shares is based on a remaining countof quota of shares available to the client node prior to thetransmission of the request.
 14. The computer system of claim 10,wherein the transmitted request by each of the client nodes comprises anindication that the client node is releasing the count of quota shares.15. The computer system of claim 10, wherein the vector is updated basedon a change in resource usage.
 16. The computer system of claim 10,wherein the vector is updated by a background thread on a periodicbasis.